import random

from django.http import HttpRequest
from django.shortcuts import render


def show_index(request: HttpRequest):
    fruits = [
        '苹果', '香蕉', '葡萄', '桔子', '甘蔗', '草莓', '西瓜', '蓝莓',
        '杨梅', '芒果', '榴莲', '火龙果', '山楂', '哈密瓜', '山竹', '荔枝'
    ]
    selected_fruits = random.sample(fruits, 4)
    return render(request, 'index.html', {'fruits': selected_fruits})
